angular.module('dishApp').service('DishService', function ($http) {
    var service = {};

    service.openWarningModal = function ($uibModal, $scope, index) {
        var modalInstance = $uibModal.open({
            animation: true,
            ariaLabelledBy: 'modal-title',
            ariaDescribedBy: 'modal-body',
            templateUrl: 'deleteWarning_modal.html',
            controller: 'DeleteModelController',
            size: 'sm',
            resolve: {
                parentScope: function () {
                    return $scope;
                },
                index: function () {
                    return index;
                }
            }
        });
        return modalInstance;
    };

    service.openGroomModal = function ($uibModal, $scope, index) {
        var modalInstance = $uibModal.open({
            animation: true,
            ariaLabelledBy: 'modal-title',
            ariaDescribedBy: 'modal-body',
            templateUrl: 'groomWarning_modal.html',
            controller: 'GroomModelController',
            size: 'sm',
            resolve: {
                parentScope: function () {
                    return $scope;
                },
                index: function () {
                    return index;
                }
            }
        });
        return modalInstance;
    };



    return service;
});

